<?php
error_reporting(E_ALL);
@set_time_limit(1000);
// set_magic_quotes_runtime(0);
ob_start();	# 开始缓存

define('MY_PATH',	str_replace('\\', '/', dirname(__FILE__)).'/');
define('ROOT_PATH',	str_replace('\\', '/', dirname(dirname(__FILE__))).'/');
define('HTML_PATH',	MY_PATH.'html/');

if(file_exists(ROOT_PATH.'data/install.lock')){
	$lock = file_get_contents(ROOT_PATH.'data/install.lock');
	if($lock == 'installed'){
		exit('Installed.');
	}
}

include_once MY_PATH.'inc/func.inc.php';
include_once MY_PATH.'inc/lang.inc.php';
include_once MY_PATH.'inc/zendguard.php';
nothingToDo();

$__body = array();

$charset = 'utf-8';
define('CHARSET', $charset);
define('DBCHARSET', str_replace('-', '', $charset));
define('ORIG_TABLEPRE',					'tb_');

define('IN_PUBLIC', true);		// 正式发布
define('IN_SPECIAL', true);		// 为调用 config.inc.php 时跳过 session_start()
define('ENV_CHECK_ERROR', 31);

$func_items = array('mysql_connect', 'fsockopen', 'gethostbyname', 'file_get_contents', 'xml_parser_create');

$env_items = array(
	'os'				=> array('c' => 'PHP_OS', 'r' => 'notset', 'b' => 'unix'),
	'php'				=> array('c' => 'PHP_VERSION', 'r' => '4.0', 'b' => '5.0'),
	'attachmentupload'	=> array('r' => 'notset', 'b' => '2M'),
	'gdversion'			=> array('r' => '1.0', 'b' => '2.0'),
	'diskspace'			=> array('r' => '10M', 'b' => 'notset'),
);

$dirfile_items = array(
	'config'	=> array('type' => 'file', 'path' => './data/config.inc.php'),	// 系统配置
	'index'		=> array('type' => 'file', 'path' => './index.html'),			// 首页
	'pub'		=> array('type' => 'dir', 'path' => './pub'),					// 静态HTML目录
	'data'		=> array('type' => 'dir', 'path' => './data'),					// 数据文件目录
	'cache'		=> array('type' => 'dir', 'path' => './data/cache'),			// 文件缓存目录
	'compile'	=> array('type' => 'dir', 'path' => './data/compile'),			// Smarty编译文件目录
	'lang'		=> array('type' => 'dir', 'path' => './data/lang'),				// 语言文件目录
	'upload'	=> array('type' => 'dir', 'path' => './data/uploads'),			// 上传文件目录
	// 'demo'		=> array('type' => 'dir', 'path' => './install/data/uploads'),	// 安装目录下的示例文件
);

?>